Advanced Lane Finding Project

This notebook lays out the process and code of advanced techniques in detecting lance from a camera. Here is the list of the overview of it:

  1. Camera Calibration and Distortion Correction
  2. Color and Gradient Threshold
  3. Perspective Transform into Bird's Eye View
  4. Finding Line and Lane Pixels
  5. Measuring Curvature and Vehicle Position
  6. Draw Lane on Original Image
  7. The Pipeline for the Videos

Import Packages

Helper Functions


1. Camera Calibration and Test Images Undistortion


Obtain Calibration Parameters and Draw Chessboard Corners

Undistort Calibration and Test Images

Calibration Image Comparison: Original Image vs Undistorted Image

2. Color and Gradient Threshold


Testing on one test image first

Testing Color and Gradient Functions

Define Threshold Combination Function and Apply to Test Images

3. Perspective Transform


Testing on One Test Image and Obtain Matrix Transformation

Apply the Transformation to the Thresholded Images

4. Lane Finding


4.0. Create Line Classes to Help in Video Processing

4.1. Applying Sliding Windows on Test Images

4.2. Applying Sliding Windows with No Window Drawn

4.3. Applying Sliding Windows with Road Drawn on Test Images

4.4. Finding Lane with Previously Found Poly Lines

5. Curvature and Position Finding

Pipeline to output binary warped images with curvature and vehicle position drawn

6. Lane Unwarp


Obtain Inverse Transformation Matrix

Test it on one test image

Apply it to all test images

7. Full Pipeline for the Videos


Define Sanity Check Functions

Define Functions to Abstract some Steps in the Pipeline

Define the Full Pipeline Function

Test it on one test image

Processing the video

Challenge Video

Harder Challenge Video